home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 7_5.lha / 7_5 / 7_5a3_line.c < prev    next >
Text File  |  1993-08-08  |  489b  |  26 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. / Exercise 7.5
  6. / Rectangle derived from a line.
  7. / the data in available to derived classes,
  8. / but otherwise private.
  9. lass line : public shape
  10.  
  11. rotected:
  12.    point w, e;
  13.  
  14. ublic:
  15.    point north();
  16.    point east();
  17.    point south();
  18.    point west();
  19.  
  20.    void move(int a, int b);
  21.    void draw();
  22.  
  23.    line(point a, point b);
  24.    line(point a, int l);
  25. ;
  26.